<?
require("config.php");

$show_backnav = "product_menu";
$location_status .= "| Delete";

$menuname = array(
	"Info",
	"Pictures",
	"Color",
	"Size",
	"Specification",
	"Features",
	"Accessories",
	"Packaging",
);

$menutarget = array(
	"delete",
	"delete_pictures",
	"delete_color",
	"delete_size",
	"delete_specification",
	"delete_features",
	"delete_accessories",
	"delete_packaging",
);

$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=3");

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}


$Query = "select color from pro_basic where id=$id Limit 1";
$r = myQuery($Query);

$itemcolors=$r[0][0];

$Query = "select name from pro_color";
$colors = myQuery($Query);

require($rela_path . "inc/header.php");

?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="action" type="hidden" value="delete">


  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td><strong>Are you sure to delete this product ?</strong> 
	  
	  <input type="Submit" class="button" name="Button" value="   Yes   "> 
        <input type="button" class="button" name="Submit2" value="   No   " onClick="Redirect('product_menu.php',1);"> 
        <br>
        <br>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="tb">



<?
$itemcolor = split(",",$itemcolors);

for ($i=0;$i<count($itemcolor);$i=$i+1){
                    	
	if ($i%2==0) print ("<tr class=tbcontent1>");

	$active = NULL;
	if (in_array($colors[$i][0], $itemcolor)) $active = "CHECKED";
                    	
?>
                    
	<td width="50%">
	<?print($colors[$i][0])?>
	</td>


<?

if ($i%2==1) {

	print ("</tr>");

}else if ($i==count($itemcolor)-1) {

	print ("<td>&nbsp;</td></tr>");

}
                      
}
?>

       </table>


        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p></td>
                      </tr>
                    </table>
                    </form>
            <!--Content End-->
            <?
require($rela_path . "inc/footer.php");
?>
        